package com.hz1202.miaosha.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author: mol
 * @Description:
 * @Date: create in 8:37 2018/5/4
 */
public class ValidatorUtil {

    //private static final Pattern mobile_pattern = Pattern.compile("/^1\\d{10}$/");
    private static final Pattern mobile_pattern = Pattern.compile("1\\d{10}");

    public static boolean isMobile(String src){
        if(StringUtils.isEmpty(src)){
            return false;
        }
        Matcher matcher = mobile_pattern.matcher(src);
        return matcher.matches();
    }
}
